package cn.kk.jump;

import java.awt.image.BufferedImage;

public class Sky extends State{
    public int WIDTH=576;
    public int HEIGHT=324;
    public int x=0;
    public int y=0;
    public int speed=1;
    public int y1=-324;

    /**重写getImage()获取对象的图片*/
    public BufferedImage getImage(){
        return Images.sky;//返回sky图片即可
    }
    public int getY1(){
        return y1;//返回y1
    }

    /**天空移动*/
    public void step(){
        y+=speed;
        y1+=speed;
        if (y>World.HEIGHT){
            y=-World.HEIGHT;
        }
        if (y1>World.HEIGHT){
            y1=-World.HEIGHT;
        }
    }
}
